package cn.thornbird.orgsync.model.wechat;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class DepartmentList extends Response {

    @JsonProperty("department")
    private List<Department> departments;


    @Data
    public static class Department {

        @JsonProperty("id")
        private Long id;

        @JsonProperty("name")
        private String name;

        @JsonProperty("name_en")
        private String englishName;

        @JsonProperty("parentid")
        private Long parentId;

        @JsonProperty("order")
        private Long order;

        @JsonProperty("department_leader")
        private List<String> leaders;

    }

}
